#include <stdio.h>
#include "dllist.h"

int main ()
{
    DLList list;
    SIZE_T i = 0;
    ELEMTYPE x;
    POSITION p;

    list = createDLList();
    if (list != NULL)
    { 
        while (i < 10)
        {
            appendElemDLList(list , i);
            i++;
        }
        printDLList(list);
        x = 9;
        p = locateVertexDLList(list, x);
        insertPostDLList(list, p, -1);
        printDLList(list);

        appendElemDLList(list , 99);
        appendElemDLList(list , 99);
        appendElemDLList(list , 99);
        printDLList(list);

        insertPreDLList(list, p, -1);
        printDLList(list);
        x = 9;
        deleteElemDLList(list, x);
        printDLList(list);
        getPositionByIndexDLList(list, 0);
        destroyDLList(&list);
    }
    return 0;
}
